Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DatabaseStorageModule not working correctly #3506

Conversation

rapterjet2004
Copy link
Contributor

@rapterjet2004 rapterjet2004 commented Dec 11, 2023

Room was overwriting old data in ArbitraryStorage, because there was a conflict detected in ArbitraryStoragesDao
@Insert(onConflict = OnConflictStrategy.REPLACE). This was because the composite primary key wasn't including the conversation token as well. primaryKeys = ["accountIdentifier", "key"]

ToDo

  • Create a Migration from Dual Key to Triple Key
  • Test Migrations
image image

Before

issue-3506-before.mp4

After

issue-3506-after.mp4

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

@rapterjet2004 rapterjet2004 added bug Something isn't working 2. developing Work in progress feature: 🗨️ chat labels Dec 11, 2023
@rapterjet2004 rapterjet2004 self-assigned this Dec 11, 2023
@rapterjet2004 rapterjet2004 force-pushed the bug-fix-important-conversation-not-working-for-multiple branch from 50f7b7d to f963e51 Compare December 12, 2023 16:28
@rapterjet2004 rapterjet2004 added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Dec 12, 2023
@rapterjet2004 rapterjet2004 marked this pull request as ready for review December 12, 2023 17:27
@AndyScherzinger
Copy link
Member

@rapterjet2004 without having taken a deeper look into it, it seems you didn't implement a DB migration to "9" which is needed I think either an auto migration or an actual one.

@rapterjet2004 rapterjet2004 marked this pull request as draft December 13, 2023 15:02
@rapterjet2004 rapterjet2004 force-pushed the bug-fix-important-conversation-not-working-for-multiple branch from 072b202 to 2fe8f88 Compare December 18, 2023 17:04
- Created MigrationsTest
- Created Manual Migration from 9 to 10
- New Database has additional primary key

Signed-off-by: Julius Linus <[email protected]>
@rapterjet2004 rapterjet2004 force-pushed the bug-fix-important-conversation-not-working-for-multiple branch from cb1839e to 857d356 Compare December 19, 2023 15:25
@rapterjet2004 rapterjet2004 marked this pull request as ready for review December 19, 2023 15:52
@rapterjet2004 rapterjet2004 requested a review from mahibi January 10, 2024 13:43
Copy link
Contributor

Codacy

Lint

TypemasterPR
Warnings8383
Errors88

SpotBugs

CategoryBaseNew
Bad practice66
Correctness88
Dodgy code112112
Internationalization33
Malicious code vulnerability33
Performance66
Security11
Total139139

Copy link
Contributor

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/3506-talk.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.

@mahibi
Copy link
Collaborator

mahibi commented Jan 10, 2024

i suggest to not merge this PR in favor of #3569
extending the primary key might make it more difficult to implement data migrations etc.

Anyway good catch Julius 👍 👍

Copy link
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants